<?php
use yii\widgets\ActiveForm;
use kartik\file\FileInput;
use yii\helpers\Html;
use yii\bootstrap\Modal;
use yii\helpers\Url;
use yii\helpers\ArrayHelper;
?>
<style type="text/css">
	.data-form label{
		color: white;
	}

	.data-form h1,h2,h3{
		color: white;
	}
</style>
<?php
$validationUrl = ['category/validate-form'];
if (!$category->isNewRecord) {
    $validationUrl['id'] = $category->id;
}

$form = ActiveForm::begin([
    'id' => 'category',
    'enableAjaxValidation' => true,
    'validationUrl' => $validationUrl,
	]); ?>
<div class="row data-form" style="width: 80%; margin: 0px auto; padding-top: 20px; padding-bottom: 20px;background: gray;">
	<h3 style="text-align:center;"><?=$pageTitle?></h3>
	<hr/>
	<div class="col-lg-12">
		<?=$form->field($category, 'name')->textInput()->error()?>
		<?=$form->field($category, 'order')->textInput()?>
		<?=$form->field($category, 'pid')->dropDownList($category->tree())?>
        <?=$form->field($category, 'is_show')->dropDownList(Yii::$app->params['is_show'])?>
        <?=$form->field($category, 'status')->dropDownList(Yii::$app->params['status'])?>
		<?=Html::submitButton('提交', ['class'=>'btn btn-primary btn-block','name' =>'submit-button'])?>	
	</div>

</div>
<?php ActiveForm::end(); ?>
